<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title></title>
	<link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css"/>
	<link rel="stylesheet" type="text/css" href="../../css/common.css"/>
	<script src="../../js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<div class="page-header">
				<h1>
					栏目列表 <small>List</small>
				</h1>
			</div>
			<nav class="navbar navbar-default navbar-inverse" role="navigation">
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li>
							 <a href="./index.php">首页</a>
						</li>
						<li>
							 <a href="./catlist.php">栏目列表</a>
						</li>
						<li>
							 <a href="./catadd.php">增加栏目</a>
						</li>
						<li>
							 <a href="./artlist.php">文章列表</a>
						</li>
						<li>
							 <a href="./artadd.php">增加文章</a>
						</li>
					</ul>
				</div>
			</nav>
		</div>
	</div>
	<div class="row clearfix">
		<div class="col-md-4 column">
			<div class="aside">
				<h4>栏目管理</h4>
				<ul>
					<li><a href="">栏目列表</a></li>
					<li><a href="">添加栏目</a></li>
				</ul>
			</div>
			
			<div class="aside">
				<h4>文章管理</h4>
				<ul>
					<li><a href="">文章列表</a></li>
					<li><a href="">发布文章</a></li>
				</ul>
			</div>
			<div class="aside">
				<h4>个人中心</h4>
				<ul>
					<li><a href="">栏目列表</a></li>
					<li><a href="">添加栏目</a></li>
				</ul>
			</div>
		</div>
		<div class="col-md-8 column">
			<table class="table">
				<thead>
					<tr>
						<th>编号</th>
						<th>栏目名称 </th>
						<th>文章数 </th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($cat as $key => $value){ ?>
					<tr>
						<td>
							<?php printf($value["cat_id"])?>
						</td>
						<td class="catname">
							<?php printf($value["catname"]) ?>
						</td>
						<td>
							<?php printf($value["num"]) ?>
						</td>
						<td>
							<a class="btn btn-danger" href="catdel.php?cat_id=<?php printf($value["cat_id"])?>">删除</a>
							<a class="btn btn-primary" href="catedit.php?cat_id=<?php printf($value["cat_id"])?>">编辑</a>
						</td>
					</tr>
					<?php } ?>    
				</tbody>
			</table>
		</div>
	</div>
</div>

<script type="text/javascript">
	var a = $('.catname');
	console.log(a);
	
</script>

</body>
</html>